package com.tool;

/**
 * 数据中心VO
 * 
 * @author Evan.Hu
 * 
 */
public class DataCenterVO {
	/**
	 * 数据库类型：[0-MS SqlServer][1-Oracle]
	 */
	private int dbType;
	private String dbAddr;
	private String dbPort;
	private String userName;
	private String password;
	private String dbName;
	private String dcNumber;
	private String dcName;

	public String getDbTypeName() {
		String typeName = "";
		if (dbType == 0) {
			typeName = "MS SqlServer";
		} else if (dbType == 1) {
			typeName = "Oracle";
		}
		return typeName;
	}

	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj instanceof DataCenterVO) {
			DataCenterVO vo = (DataCenterVO) obj;
			if (dcNumber == vo.dcNumber) {
				return true;
			}

			return dcNumber.equalsIgnoreCase(vo.dcNumber);
		}
		return false;
	}

	public String toString() {
		return dcNumber + " - " + dcName;
	}

	public int getDbType() {
		return dbType;
	}

	public void setDbType(int dbType) {
		this.dbType = dbType;
	}

	public String getDbAddr() {
		return dbAddr;
	}

	public void setDbAddr(String dbAddr) {
		this.dbAddr = dbAddr;
	}

	public String getDbPort() {
		return dbPort;
	}

	public void setDbPort(String dbPort) {
		this.dbPort = dbPort;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getDbName() {
		return dbName;
	}

	public void setDbName(String dbName) {
		this.dbName = dbName;
	}

	public String getDcNumber() {
		return dcNumber;
	}

	public void setDcNumber(String dcNumber) {
		this.dcNumber = dcNumber;
	}

	public String getDcName() {
		return dcName;
	}

	public void setDcName(String dcName) {
		this.dcName = dcName;
	}
}
